package rhc.taskSchedule.taskSchedule.schedule.manage;

import rhc.taskSchedule.commander.TaskScheduleCommanderExecute;
import rhc.taskSchedule.taskSchedule.schedule.Schedule;

public class TaskScheduleManageImpl extends BasicTaskScheduleManageImpl {

	public TaskScheduleManageImpl(TaskScheduleCommanderExecute taskScheduleCommanderExecute) {
		super(taskScheduleCommanderExecute);
	}

	@Override
	public void run(String runningId) throws Exception {
		Schedule taskSchedule=this.getTaskScheduleByRunningId(runningId);
		taskSchedule.run();
	}

	@Override
	public void stop(String runningId) throws Exception {
		Schedule taskSchedule=this.getTaskScheduleByRunningId(runningId);
		taskSchedule.stop();
	}

	@Override
	public void pause(String runningId) throws Exception {
		Schedule taskSchedule=this.getTaskScheduleByRunningId(runningId);
		taskSchedule.pause();
	}

	@Override
	public void regain(String runningId) throws Exception {
		Schedule taskSchedule=this.getTaskScheduleByRunningId(runningId);
		taskSchedule.regain();
	}

}
